﻿
using System;
using MediaBrowserSL.RIA.ViewModels;
using MediaBrowserSL.RIA.Views;

namespace MediaBrowserSL.RIA.MvvmUtils.UI
{
    /// <summary>
    /// Manage Album Windows  
    /// </summary>
    public class ManageAlbumsVisualizer : IManageAlbumsVisualizer
    {
        /// <summary>
        /// Show Admin Albums 
        /// </summary>
        public void Show()
        {
            ChildWindowAdminAlbums dlg = new ChildWindowAdminAlbums();

            EventHandler handler = null;
            handler = delegate
            {
                ((ViewModelBase)dlg.DataContext).RequestClose -= handler;
                dlg.Close();
            };
            ((ViewModelBase)dlg.DataContext).RequestClose += handler;

            dlg.Show();
        }
    }
}
